package weka.gui.aitoom;

import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.border.TitledBorder;

import java.awt.Component;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import weka.core.Instances;
import weka.gui.aitoom.Aitoom.ExplorerPanel;


public class Roles extends JPanel implements ExplorerPanel  {

	private Aitoom explorer;
	private JPanel  algorithmPanel;
	private Instances instance;
	public Roles() {
		setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBorder(new TitledBorder(null, "Search roles", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(10, 11, 699, 103);
		add(panel);
		panel.setLayout(null);
		
		JButton btnNewButton = new JButton("Choose");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				algorithmPanel.add(new ClustererPanel());
				algorithmPanel.show();
			}
		});
		btnNewButton.setBounds(31, 37, 89, 23);
		panel.add(btnNewButton);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setModel(new DefaultComboBoxModel(new String[] {"Clustering ", "FastMiner", "Classifier"}));
		comboBox.setBounds(145, 38, 525, 20);
		panel.add(comboBox);
		
		JPanel algorithmPanel = new JPanel();
		algorithmPanel.setBorder(new TitledBorder(null, "Algorithm", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		algorithmPanel.setBounds(10, 125, 699, 353);
		add(algorithmPanel);
		algorithmPanel.setLayout(null);

	}
	@Override
	public void setExplorer(Aitoom parent) {
		this.explorer = parent;
		
	}
	@Override
	public Aitoom getExplorer() {
		return explorer;
	}
	@Override
	public void setInstances(Instances inst) {
		this.instance = inst;
		
	}
	@Override
	public String getTabTitle() {
		return "Roles";
	}
	@Override
	public String getTabTitleToolTip() {
		return "Roles tab";
	}
}
